package com.tea.source.util;

import java.util.Date;

public class SerialNumUtil {
	private static String CNserialnum;
	private static String JGserialnum;
	private static String XSserialnum;
	public String getCNserialnum() {
		return CNserialnum;
	}
	public void setCNserialnum(String cNserialnum) {
		CNserialnum = cNserialnum;
	}
	public String getJGserialnum() {
		return JGserialnum;
	}
	public void setJGserialnum(String jGserialnum) {
		JGserialnum = jGserialnum;
	}
	public String getXSserialnum() {
		return XSserialnum;
	}
	public void setXSserialnum(String xSserialnum) {
		XSserialnum = xSserialnum;
	}
	
	public static String CNserialnumFactory(){
		
		CNserialnum = "CN"+new Date().getTime()+"";
		return CNserialnum;
	}
	
	public static String JGserialnumFactory(String CNserialnum){
		
		JGserialnum = CNserialnum.replace("C", "J").replace("N", "G");
		return JGserialnum;
	}
	
public static String XSserialnumFactory(String JGserialnum){
		
		XSserialnum = JGserialnum.replace("J", "X").replace("G", "S");
		return XSserialnum;
	}

}
